import {observable,action} from 'mobx-miniprogram'
import {getstorage} from '../utils/storage'
export const userstore= observable({
  token:getstorage("token") || '',
  userinfo:getstorage("userinfo") ||'',
  settoken:action(function(newtoken){
    this.token=newtoken
  }),
  setuserinfo:action(function(newuserinfo){
    this.userinfo=newuserinfo
  })
})